﻿using Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Service.FileStrategy
{
    /// <summary>
    /// 工厂类，负责对象的实例化
    /// </summary>
    public class FileOperateFactory
    {
        public static FileOperateStrategy CreateFileOperateStrategy(string uploadModel)
        {
            switch (uploadModel)
            {
                case UploadModel.Local:
                    return new LocalStrategy();
                case UploadModel.QiNiu:
                    return new QiNiuStrategy();
                default:
                    return new QiNiuStrategy();
            }
        }
    }
}
